package cn.wmw.xyy.feign;

import cn.wmw.result.JsonResult;
import cn.wmw.xyy.fallback.UserCodeFeignClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(contextId="UserCodeFeignClient",
        value = "service-comm",
        fallbackFactory = UserCodeFeignClientFallbackFactory.class,
        path = "/codeUser")
public interface UserCodeFeignClient {

    /**
     * 根据专属注册码linkCode获取对象
     */
    @RequestMapping(value = "/code/{linkCode}",method = RequestMethod.GET)
    JsonResult linkCode(@PathVariable("linkCode")String linkCode);
}
